{config_load file=test.conf section="setup"}

{include file="header.tpl"}

<div id="main_pane">
<h1>Division Management</h1>

<form action="{$SCRIPT_NAME}" method="post" enctype="multipart/form-data" onSubmit="return confirm('Are you sure you want to copy all the divisions from the selected tournament?');">
{html_options name=Tournaments[] size=1 options=$tournaments_list}
<input type="submit" value="Copy divisions from selected tournament" name="Copy_Divisions">
</form>

 <table border="0">
  	<tr>
 		<th>		
 			ID		
 		</th>
		<th>
		Sequence
		</th>
 		<th>
 			Division
 		</th>
 		<th>
 			Event Name
 		</th> 		
 		<th>		
 			Section Name	
 		</th>			
 		 <th>		
 			Division Type	
 		</th>			
 	</tr>
 	{section name=division_list loop=$divisions}
	<tr>
 		<td align="center">
 			{$divisions[division_list].ID}		
 		</td>
 		<td align="center">
 			{$divisions[division_list].SEQUENCE}
 		</td>
 		<td>
 			{$divisions[division_list].NAME}
 		</td>
 		<td  align="center">
 			{$divisions[division_list].EVENT_NAME}
 		</td> 	
 		 <td align="center">
 			{$divisions[division_list].SECTION_NAME}
 		</td> 			
 		 <td align="center">
 			{$divisions[division_list].TYPE}
 		</td> 		 		 			
 		<td>
			<a href="edit_division.php?ID={$divisions[division_list].ID}">edit</a>
 		</td> 	
 	</tr>

 	 {/section}
 	 <tr>
 	 <td></td>
 	 <td></td>
 	 <td></td>
 	 <td></td> 
 	 
 	 <td>	 
 	 <a href="edit_division.php?ID=new">new</a>
 	 </td>
 	 </tr>
 </table>


{include file="footer.tpl"}
</body>
</div>